import { CommonService } from '../../core/common/common.service';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CloudSharedModule } from '../../shared/shared.module';
import { httpFactory } from '../../core/http/http.factory';
import { DefaultRequestOptions, requestOptionsProvider } from '../../core/http/default-request-options.service';
import { LocalXSRFStrategy } from '../../core/http/local-xsrf-strategy.service';
import { Http, XSRFStrategy, XHRBackend, RequestOptions } from '@angular/http';
import { ConfigService } from '../../core/common/config.service';
import { TableDictService } from '../../core/common/table-dict.service';
import { TagService } from '../../core/common/tag.service';
import { EchartsNg2Module } from '../../shared/component/echarts-ng2';
import { UserInfoBrandRankMap } from './brandrank/brand-rank-map';
import { UserInfoBrandRank } from './brandrank/brandRank';
import { UserInfoService } from './service/user-info.service';
import { Router } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { BaiduMapModule } from 'angular2-baidu-map';
const routes: Routes = [
  { path: '', redirectTo: 'userinfo' },
  { path: 'brandRank', component: UserInfoBrandRank },
];
@NgModule({
  imports: [
    CloudSharedModule,
    FormsModule,
    EchartsNg2Module,
    BaiduMapModule,
    RouterModule.forChild(routes)
  ],
  declarations: [
    UserInfoBrandRank, UserInfoBrandRankMap
  ],
  exports: [
    RouterModule,
  ],
  providers: [TagService, UserInfoService, CommonService, ConfigService, requestOptionsProvider, TableDictService,
    DefaultRequestOptions,
    {
      provide: XSRFStrategy, useClass: LocalXSRFStrategy,
    },
    {
      provide: Http,
      useFactory: httpFactory,
      deps: [XHRBackend, RequestOptions, ConfigService, Router]
    }]
})
export class UserInfoModule { }
